<template>
  <view  @click="chooseImage" class="clickPhoto flex a-item j-content">
    <image class="photo"  src="http://121.41.75.32:8002/file/static/ashPhoto.png" mode="heightFix"  />
  </view>
</template>

<script>
export default {
  name: "photo",
  methods:{
    chooseImage(){
      const _this = this
      uni.chooseImage({
        count: 6, //默认9
        sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
        sourceType: ['camera'], //从相册选择
        success: function (res) {
          _this.$emit('change',res.tempFilePaths[0])
        }
      });
    },
  }
}
</script>

<style lang="scss" scoped>
.clickPhoto{
  width: 200rpx;
  height: 200rpx;
  background: #E9E9E9;
  border: #D8D8D8 2px dashed;
  position: relative;
.photo{
  width: 100rpx;
  height: 100rpx;
}
}
</style>
